.\" $Id: bw_tcp.8 1.3 00/10/16 17:13:39+02:00 staelin@hpli8.hpli.hpl.hp.com $
.TH BW_TCP 1 "$Date: 00/10/16 17:13:39+02:00 $" "(c)1994 Larry McVoy" "LMBENCH"
.SH NAME
bw_tcp \- time data movement through TCP/IP sockets
.SH SYNOPSIS
.B bw_tcp
[
.I "-m <message size>"
]
[
.I "-M <total bytes>"
]
[
.I "-P <parallelism>"
]
[
.I "-W <warmups>"
]
[
.I "-N <repetitions>"
]
.I "server"
.br or
.B bw_tcp
.I -s
.br or
.B bw_tcp
.I "-S <server>"
.SH DESCRIPTION
.B bw_tcp
is a client/server program that moves data over a TCP/IP socket.  Nothing is
done with the data on either side; 
.I "total bytes"
of data is moved in 
.I "message size"
chunks.
.LP
.B bw_tcp
has three forms of usage: as a server (-s), as a client (bw_tcp localhost), and
as a shutdown (bw_tcp -S localhost).
.LP
The default amount of data is 10MB.  The client form may specify a different
amount of data.  Specifications may end with ``k'' or ``m'' to mean
kilobytes (* 1024) or megabytes (* 1024 * 1024).
.SH OUTPUT
Output format is
.ft CB
Socket bandwidth using localhost: 2.32 MB/sec
.ft
.SH MEMORY UTILIZATION
This benchmark can move up to six times the requested memory per process
when run through the loopback device.
There are two processes, the sender and the receiver.
Most Unix
systems implement the read/write system calls as a bcopy from/to kernel space
to/from user space.  Bcopy will use 2-3 times as much memory bandwidth:
there is one read from the source and a write to the destionation.  The
write usually results in a cache line read and then a write back of
the cache line at some later point.  Memory utilization might be reduced
by 1/3 if the processor architecture implemented "load cache line"
and "store cache line" instructions (as well as getcachelinesize).
.SH ACKNOWLEDGEMENT
Funding for the development of
this tool was provided by Sun Microsystems Computer Corporation 
and Silicon Graphics, Inc.
.SH SEE ALSO
lmbench(8).
.SH "AUTHOR"
Carl Staelin and Larry McVoy
.PP
Comments, suggestions, and bug reports are always welcome.
